/****** Object:  Stored Procedure dbo.CGO_AccountGetList    Script Date: Monday, March 07, 2011 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'dbo.CGO_AccountGetList') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure dbo.CGO_AccountGetList
GO

/* -------------------------------------------------------------------------------------
/   AccountGetList 
/  ------------------------------------------------------------------------------------- */
SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO

CREATE PROCEDURE dbo.CGO_AccountGetList
  @PortalID int
AS

SELECT
	M.UserID,
	U.Username,	
	PortalID,
	Token,
	M.LastUpdateDate
FROM dbo.CGO_Account M
INNER JOIN dbo.Users U ON M.UserID = U.UserID
WHERE PortalID = @PortalID
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
